|
|
|
|
|
|
|
Figure 12.29
When you place a status bar on a
form, it is configured automatically. |
|
|
|
|
|
|
|
|
After you draw the status bar, you can start setting the properties to control its appearance and to create any additional panels that you need to display information. As you saw when you first drew the status bar control, it sizes itself to fit across the entire form. You can, however, control the height of the status bar either by setting its Height property or by clicking and dragging one of its sizing handles. |
|
|
|
|
|
|
|
|
Two other properties control the basic appearance of the entire status bar: the Align property and the Style property. |
|
|
|
|
|
|
|
|
The Align property of the status bar controls which edge of the form, if any, the status bar is "docked" against. The Align property has five possible settings: |
|
|
|
|
|
|
|
|
vbAlignNoneAllows you to position the status bar anywhere on your form. |
|
|
|
|
|
|
|
|
vbAlignTopPositions the status bar at the top of the form. |
|
|
|
|
|
|
|
|
vbAlignBottomPositions the status bar at the bottom of the form. This is the default setting of the property and the position where users probably expect to find the status bar. |
|
|
|
|
|
|
|
|
vbAlignLeftPlaces the status bar at the left edge of the form. |
|
|
|
|
|
|
|
|
vbAlignRightPlaces the status bar at the right edge of the form. |
|
|
|
|
|
|
|
|
|
Unless you have a specific reason for using a different alignment, sticking with the default, bottom alignment is best. Although another alignment might be a novel approach, it would probably confuse users who are accustomed to the standard alignment.  |
|
|
|
|
|
|
|
|
|
|
As you can see in Figure 12.28, the StatusBar control allows you to display a number of different messages at the same time. Each section of the status bar is known as a panel. The following two settings of the Style property of the status bar determine whether the status bar displays a single panel or multiple panels: |
|
|
|
|
|
|
|
|
sbrNormalAllows multiple panels to be displayed |
|
|
|
|
|
|
|
|
sbrSimpleAllows only a single panel to be displayed |
|
|
|
|
|